package biz.ezcom.design.pattern.composite;

/**
 * 所有组件抽象
 */
public abstract class Composite {
	private int level;//树形的层次
	private String name;
	public Composite(int level, String name){
		this.level = level;
		this.name = name;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public abstract void add(Composite composite);
	public abstract void remove(Composite composite);
	public abstract void show();
}
